import request from '@/utils/request'

// 创建过程检验
export function createInspectProcess(data) {
  return request({
    url: '/qms/inspect-process/create',
    method: 'post',
    data: data
  })
}

// 更新过程检验
export function updateInspectProcess(data) {
  return request({
    url: '/qms/inspect-process/update',
    method: 'put',
    data: data
  })
}

// 删除过程检验
export function deleteInspectProcess(id) {
  return request({
    url: '/qms/inspect-process/delete?id=' + id,
    method: 'delete'
  })
}

// 获得过程检验
export function getInspectProcess(id) {
  return request({
    url: '/qms/inspect-process/get?id=' + id,
    method: 'get'
  })
}

// 获得过程检验分页
export function getInspectProcessPage(query) {
  return request({
    url: '/qms/inspect-process/page',
    method: 'get',
    params: query
  })
}

// 导出过程检验 Excel
export function exportInspectProcessExcel(query) {
  return request({
    url: '/qms/inspect-process/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
